package com.yodawnla.fishing;

import java.util.HashMap;


import com.yodawnla.fishing.system.Animation;
import com.yodawnla.lib.animation.YoAnimation;
import com.yodawnla.lib.animation.YoAnimationCreator;
import com.yodawnla.lib.animation.YoAnimationCreator.ILoadAnimationHandler;

public class AnimationMgr
{
	public static AnimationMgr getInstance()
	{
		if (instance == null)
			instance = new AnimationMgr();
		return instance;
	}
	static AnimationMgr instance;
	AnimationMgr()
	{
		YoAnimationCreator aniCreator = YoAnimationCreator.getInstance();
		
		aniCreator.createAnimation(Animation.Fishing, new ILoadAnimationHandler()
		{
			public void onLoadFinish(YoAnimation animation)
			{
				mAnimationMap.put(Animation.Fishing, animation);
			}
		});
		
	}
	
	HashMap<String, YoAnimation> mAnimationMap = new HashMap<String, YoAnimation>();
	
	public YoAnimation getAnimation(String name)
	{
		return mAnimationMap.get(name);
	}
}
